<!DOCTYPE HTML>
<html>
<head>
<script src="__PUBLIC__/Admin/Js/jquery.js"></script>
<script src="__PUBLIC__/Admin/Js/jquery-ui-1.12.0.custom/jquery-ui.min.js"></script>
<link rel="stylesheet" href="__PUBLIC__/Admin/Js/jquery-ui-1.12.0.custom/jquery-ui.min.css">
<meta charset="utf-8">
<link type="text/css" rel="stylesheet" href="__PUBLIC__/Admin/tuan/css/H-ui.css"/>
<link type="text/css" rel="stylesheet" href="__PUBLIC__/Admin/tuan/css/H-ui.admin.css"/>
<link type="text/css" rel="stylesheet" href="__PUBLIC__/Admin/tuan/font/font-awesome.min.css"/>
<title>活动管理</title>
  <style>
  .msg{width:150px;height:50px;background-color: red;display:none;}
  </style>
</head>
<body>
<nav class="Hui-breadcrumb"><i class="icon-home"></i> 首页 <span class="c-gray en">&gt;</span> 活动中心 <span class="c-gray en">&gt;</span> 活动管理 <a class="btn btn-success radius r mr-20" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新" ><i class="icon-refresh"></i></a></nav>
<div class="pd-20">
  <div class="text-c"> 日期范围：
    <input type="text" onFocus="WdatePicker({maxDate:'#F{$dp.$D(\'datemax\')||\'%y-%M-%d\'}'})" id="datemin" class="input-text Wdate" style="width:120px;">
    -
    <input type="text" onFocus="WdatePicker({minDate:'#F{$dp.$D(\'datemin\')}',maxDate:'%y-%M-%d'})" id="datemax" class="input-text Wdate" style="width:120px;">
    <input type="text" class="input-text" style="width:250px" placeholder="输入会员名称、电话、邮箱" id="" name=""><button type="submit" class="btn btn-success" id="" name=""><i class="icon-search"></i> 搜用户</button>

  </div>
  <div class="cl pd-5 bg-1 bk-gray mt-20">
    <span class="l">
    <a href="<{:U('Act/add')}>" onClick="user_add('550','','添加用户','user-add.html')" class="btn btn-primary radius"><i class="icon-plus"></i> 添加商品</a></span>
  
  </div>
  <div class="msg"></div>
  <table class="table table-border table-bordered table-hover table-bg table-sort">
    <thead>
      <tr class="text-c">
        <th width="20">ID</th>
        <th width="100">商品名称</th>
        <th width="40">商品图片</th>
        <th width="90">商品描述</th>
        <th width="220">商品描述2</th>
        <th width="50">颜色</th>
        <th width="50">尺寸</th>
        <th width="50">现价</th>
        <th width="50">原价</th>
        <th width="80">操作</th>
      </tr>
    </thead>
    <tbody>
    <foreach name="arr" item="vo">
      <tr class="text-c" id="user_<{$vo.act_id}>">
        <td><{$vo.act_id}></td>
        <td><{$vo.act_name}></td>
        <td><img style="height:40px" src="__ROOT__/Public/Uploads/<{$vo.act_picture}>"></td>
        <td><{$vo.act_des}></td>
        <td><{$vo.act_dodes}></td>
        <td><{$vo.act_color}></td>
        <td><{$vo.act_size}></td>
        <td><{$vo.act_price}></td>
        <td><{$vo.act_doprice}></td>
        <td class="f-14 user-manage"> <a title="编辑" href="<{:U('Act/edit')}>?uid=<{$vo.act_id}>" onClick="user_edit('4','550','','编辑','<{:U("Act/edit")}>')" class="ml-5" style="text-decoration:none"><i class="icon-edit"></i></a> 
        <input data-uid="<{$vo['act_id']}>" type="button" name="shanchu" value="删除"></td>
      </tr>
    </foreach>
    </tbody>
  </table>
  <div id="pageNav" class="pageNav"></div>
</div>

<script>
    $( function() {
    $('[name=shanchu]').click(function(){
      var uid=$(this).attr("data-uid");
    $( "<div>是否确认删除</div>" ).dialog({
      resizable: false,
      title:"删除",
      height: "auto",
      width: 400,
      modal: true,
      buttons: {
      "确认删除": function() {
        $( this ).dialog( "close" );
        $.get('<{:U("del")}>',{uid:uid},function(data){
      if(data.status){        
        $('#user_'+uid).remove();
        $('.msg').text(data.msg);
        $('.msg').slideDown('fast');
        setTimeout(function(){$('.msg').slideUp('fast');},1600);        
      }else{
        $('#user_'+uid+' [name="shanchu"]').val('删除');
        $('.msg').text(data.msg);
        $('.msg').slideDown('fast');
        setTimeout(function(){$('.msg').slideUp('fast');},1600);
        }     
      },'json');
      },
      "取消": function() {
        $( this ).dialog( "close" );
      }
      }
    });
  });
  });
  </script>
</body>
</html>